<?php if ($pager->haveToPaginate()): ?>
<div class="clr"></div>
<div class="pager">
<?php echo $pager->getNbResults() ?>件中 <?php echo $pager->getFirstIndice() ?> ～<?php echo $pager->getLastIndice() ?>件 表示<br>

<?php
$query = $sf_data->getRaw('query');
?>
<ul>

<?php if ($pager->getPage() != $pager->getFirstPage()): ?>
<li class="first"><span><?php echo link_to('<', $query."page=".$pager->getFirstPage()) ?></span></li>
<li class="prev"><span><?php echo link_to('<<', $query.'page='.$pager->getPreviousPage()) ?></span></li>
<?php else: ?>
<li class="first"><span> &lt; </span></li>
<li class="prev"><span> &lt;&lt; </span></li>
<?php endif; ?>
<?php $links = $pager->getLinks();?>
<?php foreach ($links as $page): ?>

<?php if ($page == $pager->getPage()):?>
<li class="current"><span><?php echo $page;?></span></li>
<?php else:?>
<li><?php echo link_to($page, $query.'page='.$page) ?></li>
<?php endif;?>
<?php endforeach ?>

<?php if ($pager->getPage() != $pager->getLastPage()): ?>
<li class="next"><span><?php echo link_to('>>', $query.'page='.$pager->getNextPage()) ?></span></li>
<li class="last"><span><?php echo link_to('>', $query.'page='.$pager->getLastPage()) ?></span></li>
<?php else: ?>
<li class="next"><span> &gt;&gt; </span></li>
<li class="last"><span> &gt; </span></li>
<?php endif;?>


</ul>
</div>
<?php endif ?>